package com.fcab.domain;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;



public class mapa_google  {

	private GoogleMap mMap;
	public static final LatLng fcab = new LatLng(-23.644387, -70.396459);
	public MapFragment mf;
	
	public  mapa_google(MapFragment _mf) {
		mf= _mf;
	    mMap=null;
	}
	
public void setConfigMap(){

		if (mMap == null) {
		    mMap = mf.getMap();
		 
				    // Check if we were successful in obtaining the map.
				    if (mMap != null) {
					    	mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
					    /*mMap.setMyLocationEnabled(true);*/
					    
					    mMap.addMarker(new MarkerOptions()
					    .position(new LatLng(-23.644878,-70.396955))
					    .title("FCAB"));
					    
					    mMap.addMarker(new MarkerOptions()
					    .position(new LatLng(-23.644873,-70.396309))
					    .title("Tren"));
					    mMap.setMyLocationEnabled(true);
		             }
	  }
	}

public void goToFCAB(){
    
	CameraPosition cameraPosition = new CameraPosition.Builder()
	.target(fcab)      
	.zoom(17)                   // Sets the zoom
	.bearing(51)                // Sets the orientation of the camera to east
	.tilt(0)                   // Sets the tilt of the camera to 30 degrees
	.build();                   // Creates a CameraPosition from the builder
	
	mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
}

public void SetInitialCoordenadas(LatLng coor){
	
}
}
